package com.uuyun.preview.controller;

import com.uuyun.preview.entity.Result;
import com.uuyun.preview.service.IUserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class UserController {
    @Resource
    private IUserService userService;

    @RequestMapping(value = "/test", method = RequestMethod.GET)
    public Result findUser(@RequestParam("userId") Integer UserId) {
        return userService.getUser(UserId);
    }
}
